from django import template

register = template.Library()

@register.simple_tag
def errmsg(errlist):
    if errlist:
        return errlist[0]
    else:
        return ''
